home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / dialogs.zip / DLGHLP.HLP (.txt) < prev    next >
Borland Turbo Vision Help  |  1993-01-02  |  20KB  |  200 lines

  1. There is no help available for this item. 
  2. General Help 
  3.  Operating Modes
  4.    Design
  5.    Try
  6.    Ordering
  7.  Designing
  8. Dialogbox
  9.  Moving
  10. Control
  11.  Resizing
  12. Controls
  13.  Editing
  14. Control
  15.  Copyright
  16. information
  17. Designing a Dialogbox S
  18. While there is no fixed way to design a dialogbox, here's one suggested sequence: V
  19. 1.In design
  20. mode, work with the dialogbox large enough so that you won't be crowded. 
  21. 2.From the Add menu, select a control to add.  This will bring up a dialog where you can enter the necessary information.  Use the online help (F1 key) if you have a question as to what goes in a particular field.  When the OK button is pressed, the control will appear in the lower right corner of the design box.  The control is then positioned by dragging it with the mouse, or by using the arrow keys (Shift+arrow moves a little faster). Work in the upper left corner of the box. !
  22. 3.Continue adding controls as desired.  At any time, controls can be repositioned or sized with the mouse.  If something other than position or size needs changing, select the control and from the Edit menu choose Edit Selected (or use F7).  This will bring up its dialogbox for changes. 
  23. 4.When all the controls have been added and positioned, size the box to fit and move it to the desired location on the desktop.  Be sure and add a title (Dialog Parameters from the Edit menu). 
  24. 5.Enter Try Mode with the F9 key and test the dialogbox.  Be sure to check how the controls sequence using the Tab key.  Exit Try mode with Esc or click on the close box. 
  25. 6.If the Tab sequence needs changing, use F8 to enter ordering mode.  With the mouse, click on each control to establish the desired order.   Exit back to design mode with F8. "
  26. Changing the sequence without a mouse is a little more complicated.  Use the Tab key to select (highlight) the next control to be sequenced.  Then press the Enter key to enter the selected control into the sequence.  After all controls have been entered, exit back to design mode with F8. 
  27. Some controls (such as Static Text, and Labels) don't enter into the tab sequence of a dialogbox.  You can order these if it's convenient, but the order won't effect the final results. /
  28. Be sure to recheck the tab order in Try
  29. mode. 
  30. 7.This is a good time to save your work.  Choose Save or Save As from the File menu to create or update a .DLG file.  Any file with the same name will be renamed with a .BKP extension. 
  31. 8.You can preview the source code to be generated by choosing Write Source to Screen from the Operations menu.  The code will appear in a viewer window. H
  32. 9.To create source code for your dialogbox, choose Write Source to File from the Operations menu and choose a filename (.SRC is the default extension). The source code produced will consist of a dialogbox definition function and a data record with fields matching those required by the dialogbox's SetData and GetData methods. 
  33. The .SRC file generated may be inserted directly into TESTCASE.PAS (at the line of asterisks) to provide a program to test the dialogbox. 
  34. 10.To generate a resource file or add the new dialogbox to an existing resource or EXE file, choose Write
  35. Resource from the Operation menu. 
  36. Design Mode 
  37. Dialog Design begins in design mode and this is the mode that you use for all layout work and editing.  In design mode, the dialogbox doesn't look or act quite like it will in the final design.  Here's some of the differences: ]
  38. A 'canvas' background is used to better delineate the actual space occupied by the control. )
  39. Controls are colored red when selected. $
  40. Multiple controls may be selected. B
  41. All controls may be selected even those not normally selectable. 
  42.  Dialog Parameters
  43. Allows entering/changing the title of the dialog box and other dialog box parameters. 
  44. The Dialog's title is entered here. 
  45. When Dialog Design writes source code for your dialog, it writes a function named MakeDialog by default.  You can specify another name here. `
  46. If the function will be used as a method, precede the function name with the object's name as: 
  47.     TMyProgram.MakeFileDialog
  48. When Dialog Design writes source code for a dialogbox, it defines a record to be used with the dialogbox's SetData and GetData methods.  By default, the name 'DataRec' is used. M
  49. To eliminate name conflicts, you may want to change the name in this field. 
  50. Enter any reminder notes here (up to 512 characters). 
  51.  Edit Selected
  52. Allows editing the selected control. 
  53.  Delete Selected
  54. Deletes the selected control. 
  55.  Select All  (F4)
  56. Selects all the controls. 
  57. To select most of the controls in the dialog, it's usually easiest to select them all and then, holding down the shift key, unselect those not wanted by clicking on them with the mouse. 
  58. See also Selecting
  59. Controls. 
  60.  Selecting Controls
  61. A single control may be selected with the mouse by clicking on it.  To select a control with the keyboard, use Tab or ShiftTab until it is highlighted. 
  62. To select multiple controls, select the first, then hold down the shift key while clicking on the others.  Note that, in this mode, clicking toggles selection on and off so it's possible to deselect as well as select. K
  63. To select all controls, use F4 or choose 'Select All' from the Edit menu. 
  64. Resizing a Control 
  65. To resize a control first select it then click and drag on its lower right corner.  Note that some controls only size in one dimension and all have a minimum size. i
  66. You can also change a control's size by changing the width and height fields in the control's edit
  67. box. 
  68. Editing a Control 
  69. To edit a control, double click it with the left button or click on it with the right button.  Or select it with the Tab key and press F7.  Either way brings up the control's Add/Edit dialog. 
  70. Moving Controls 
  71. To move controls, select the controls to be moved, then click on any one of them and, without releasing the button, drag the group to the desired position. 3
  72. The group may also be moved using the arrow keys. 
  73. When Dialog Design writes source code for a dialogbox, it defines a record to be used with the dialogbox's SetData and GetData methods.  This entry is the name for this control's field.  Initially, a unique symbol of the form FieldXXX is generated here.  You will probably want to change the ID to something that better describes the field. 
  74. The help context identifier and value are entered here.  Alternatively, if you have loaded a help
  75. context
  76. definition
  77. file, click on the '*' (or type '*' in the help context field) to bring up a pick list of choices. 
  78.    Help Context Definition File
  79. If you will be using a context sensitive help file, the definition file may be read in using the menu selection alt-O/H.  You will then be able to select help context ID's from a pick list when adding controls to the dialogbox. 
  80. This file should be in the format generated by Borland's help compiler, TVHC. For demonstration purposes, try DEMOHELP.PAS (normally in the TVDEMOS directory). 
  81. By default, the proper pointer name for the standard TVision control is already entered in this field.  If you wish to use a derived control similar to one of the TVision controls, change the pointer name to that for your control.  The name entered will be used when generating the dialogbox source code.  Depending on what changes you've made, you may also have to do some editing of the generated source code. c
  82. Please be aware that only standard TVision controls can be used if a resource is to be generated. 
  83. The button's command ID and value are entered here.  Alternatively, click on the '*' (or type '*' in the Command field) to bring up a pick list of common choices. 
  84. Enter the width here.  If 0 is entered, Dialog Design will set the width to fit the text. 
  85. Up to 255 characters may be entered.  For a short text selection, entering all on a single line is appropriate.  For longer texts, you may want to indicate where line breaks should occur. n
  86. Entering zero for the width and height will tell Dialog Design to select a width and height to fit the text. 
  87. You can specify the field width and height here but usually the easiest way is to just enter zero in these fields and Dialog Design will find the size to fit. 
  88. Each line of text may be centered or left justified in the field. 
  89. Select either TStaticText or TColoredText here.  With TColoredText, you will be given an opportunity to specify the color attribute for color displays 
  90. The files COLORTXT.TPU and COLORTXT.INT supplied with Dialog Design contains the documentation and unit code for TColoredText. 
  91. TColoredText is a descendant of TStaticText which allows the specification of text color for color displays.  TColoredText behaves identically to TStaticText on black and white displays. 
  92. A numerical color attribute may be entered here or, alternatively, you may push the Select button to select your colors from a color chart. 
  93. The Select button brings up a color chart from which you may select the attribute for the TColoredText control. 
  94. If 0 is entered for the width, Dialog Design will try to set the width to an appropriate value.  In a few cases, especially if there is more than one column, the calculated result may not be satisfactory and you may do better by selecting you're own width. 
  95. Check this box if a scrollbar is desired with the listbox. 
  96. Add a control to the dialogbox. 
  97. Add a TLabel control. 
  98. Labels must be attached to other controls.  Before adding a label with this selection, be sure to select the control to which it will be attached. O
  99. You can also attach a label to a control when adding or editing that control. 3
  100. More than one label may be attached to a control. 
  101. Use this field to specify or change any label you want attached to this control.  The field may be left blank if no label is desired. 
  102. Normally, when Dialog Design generates source code, it uses a generic PView named 'Control' to construct and insert the control.  If you need to save a pointer to this control, you should specify your own variable symbol name here.  Dialog Design will then use your selection and insert the name in a Var definition table. 
  103. The Options button will open up a dialog box allowing selection of the ofXXXX Option flags and the evXXXX Eventmask bits. 
  104. The Eventmask radio buttons have two settings: 
  105.    ( ) Default
  106. Gives the default Eventmask for the particular control. 
  107.    ( ) Select
  108. Allows the selection of a different Eventmask. 
  109. The Options radio buttons have two settings: 
  110.    ( ) Default
  111. Gives the default settings for the particular control. 
  112.    ( ) Select
  113. Allows the selection of options other than the defaults. 
  114. In most cases, you'll want to use the default selections.  However, there are some special cases where other settings are desirble.  Here's some of the more interesting ones: 
  115.    [ ] ofFramed
  116. When set the control will be framed. 
  117.    [ ] ofSelectable
  118. If not set the control can't be selected.  For example, a TInputline could be made read only by turning off this bit. #
  119.    [ ] ofCenterX
  120.    [ ] ofCenterY
  121. Force the control to be centered in the dialog box when inserted.  This option might be desirable for the dialogbox itself to force centering in both 25 and 50 line modes. See Notes
  122. Centering. 
  123.    Notes on Frames
  124. Frames are painted on the dialog's TFrame control which is on the bottom of the pack.  Hence frames won't be visible in Design mode as they are then covered by the canvas background.  Frames will become visible in Try mode. R
  125. A simple frame may be added to a control by setting its ofFramed bit in Options. 
  126. More often you may want to frame several controls together.  Here's now to do it.  Add a blank static text control (no text) with the ofFramed bit set. Position and stretch this control over the controls to be framed so that it just covers them.  Now, to get the control underneath, enter Ordering mode and click on the static text control.  This will put it on the bottom so that the controls it frames will then be visible again. 
  127.    Notes on Centering
  128. The option bits ofCenterX and ofCenterY tell Turbo Vision to center the control in the X or Y direction when it's inserted into the dialogbox.  However, there's nothing to stop you from dragging or resizing it once it's been inserted. 
  129. Dialog Design will recenter any control which has the centering options set whenever the control is edited or whenever Try mode is entered.  A quick way to recenter controls, then, is to toggle into and out of Try mode. 
  130. Add a TInputLine control. 
  131. The string width specifies the maximum number of characters which may be entered in the TInputLine control. 
  132. Add a TInputLong control. m
  133. The file INPLONG.PAS supplied with Dialog Design contains the documentation and SOURCE code for TInputLong. 
  134. TInputLong is a descendant of TInputline designed for input of LongInt's. Since it has range checking, it can be used for Integer, Word or Byte input as well. 
  135. Enter the Lower and Upper limits.  These limits will be checked when tabbing out of the control and when its Valid routine is called. 
  136.    [ ] Allow Hex
  137. Allows hex input by accepting the '$' sign and A..F. 
  138.    [ ] Allow Blank
  139. If this selection is checked, a blank field is allowed and interpreted as zero.  (Note that zero must be within the lower and upper limits.) 
  140. Add a TMemo control. ?
  141. The TMemo object is found in EDITORS.PAS supplied by Borland. 
  142. Specify the memo's buffer size here.  This will be the maximum number of characters that can be entered in the Memo. _
  143. Note that within the Dialog Design program itself, buffers will be limited to 255 characters. 
  144. When Dialog Design writes source code for a dialogbox, it defines a record to be used with the dialogbox's SetData and GetData methods.  This entry is the name for this control's field.  Initially, a unique symbol of the form FieldXXX is generated here.  You will probably want to change the symbol to something that better describes the field. i
  145. Note that TMemo has two fields in the data record, one for the text length and one for the text itself. 
  146. Add a horizontal scrollbar control. 
  147. Add a vertical scrollbar control. 
  148. Add a TListbox control. 
  149. Add a TButton control. 
  150. Add a TStaticText or TColoredText control. 
  151. Add a TCheckBoxes control. 
  152. Add a TRadioButtons control. 
  153. Enter the history ID number if a history list is desired.  If 0 is entered, there will be no history list. 
  154. The number of text entries determines how many checkboxes/radiobuttons will be defined. 
  155. The number of text entries determines how many radio buttons will be defined. 
  156. Move/Resize window  (Ctrl F5) 
  157. After selecting this command, use the shift arrow keys to resize the window. To move the window use the arrow keys or ctrl arrow keys (larger increments). Enter accepts the changes, Esc aborts them. y
  158. With the mouse, the window may be resized by dragging the lower left corner. It may be moved by dragging the title bar. 
  159. Choose this command to write source code for the dialogbox when the design is finished. 
  160. The source code file consists of a function defining the dialogbox and a data record with fields appropriate for use with the SetData and GetData methods.  This file may be included in TESTCASE.PAS (at the line of *'s) to provide a complete test program. 
  161. Choose this command to preview the source code which will be output for the dialogbox. 
  162. Write Resource 
  163. Choose this command to create a resource file or add to an existing resource or EXE file.  You will be asked for a filename (default extension, REZ) and also a resource ID string.  (The ID string is case sensitive.) 
  164. If the file already exists, its extension will be changed to BKP.  If it is a resource or EXE file, the old file will be copied to the new file. Then the new resource will be added.  If a resource with the same ID is present, it will be deleted. 
  165. Note that the resource will be correct only if all controls in the dialogbox are standard Turbo Vision controls.  There currently is no checking for this. 
  166. Use this command to load a previously saved .DLG file. 
  167. Use the Save (F2) or Save As command to save your dialogbox design to disk. 
  168. This command will delete any current design (you will be given an opportunity to save it) and prepare Dialog Design for a new design. 
  169. Shell to DOS with this command.  To return to Dialog Design, type EXIT at the DOS prompt. 
  170.   Ordering Mode
  171. In Ordering Mode, you may define the Tab order of the controls in the dialogbox.  To do this with the mouse, click on each control in the order in which you want them to be selected. 
  172. To define the order using the keyboard, Tab or ShiftTab to select the desired control and press Enter to enter it into the sequence. 
  173. While the order of non-selectable controls such as Labels and Static Text is not important, it may be convenient to order them also. c
  174. When finished, use the F8 key to exit Ordering Mode.  Be sure to check the tab order in Try
  175. Mode. 
  176.   Try Mode
  177. Try Mode gives you the opportunity to try out the dialogbox.  You can make temporary entries in the various fields and check out the Tab sequencing of the controls. H
  178. Use the F9 key or click on the dialogbox's close box to exit Try Mode. 
  179.   Ordering Mode  (F8)
  180. In Ordering Mode, you may define the Tab order of the controls in the dialogbox.  To do this with the mouse, click on each control in the order in which you want them to be selected. 
  181. To define the order using the keyboard, Tab or ShiftTab to select the desired control and press Enter to enter it into the sequence. 
  182. While the order of non-selectable controls such as Labels and Static Text is not important, it may be convenient to order them also. c
  183. When finished, use the F8 key to exit Ordering Mode.  Be sure to check the tab order in Try
  184. Mode. 
  185. COPYRIGHT Z
  186. Documentation and program (C) Copyright 1990-2 by L. David Baldwin. All Rights Reserved. 
  187. Dialog Design may be copied and distributed freely by individuals to friends and acquaintances providing that no fee is charged and it is not part of a package for which a charge is made. z
  188. Please report any problems, suggestions, etc.  Contact me by Compuserve (the best way) or at one of the addresses below. )
  189.  Dave Baldwin
  190.  CompuServe ID #76327,53.
  191.  22 Fox Den Rd.,    (Approx May 15 to Oct 15)
  192.  Hollis, NH 03049        
  193.  (603) 465-7857
  194.  144 13th St. East, (Approx Oct 15 to May 15)
  195.  Tierra Verde, FL 33715
  196.  (813) 867-3030
  197.   Try Mode  (F9)
  198. Try Mode gives you the opportunity to try out the dialogbox.  You can make temporary entries in the various fields and check out the Tab sequencing of the controls. H
  199. Use the F9 key or click on the dialogbox's close box to exit Try Mode. 
  200.